package com.easyweb.session;

 

import org.jboss.seam.annotations.In;
import org.jboss.seam.annotations.Name;
import org.jboss.seam.framework.EntityQuery;
import java.util.*;

import javax.persistence.EntityManager;

import com.easyweb.entity.Bayi;
import com.easyweb.entity.Iller;
import com.easyweb.entity.UniversiteTanimlari;
 
@Name("universiteTanimlariList")
public class UniversiteTanimlariList extends EntityQuery<UniversiteTanimlari> {

	@In EntityManager entityManager;
	private static final String EJBQL = "select universiteTanimlari from UniversiteTanimlari select universiteTanimlari";
	private List<UniversiteTanimlari> universiteList=null;
	
	private static final String[] RESTRICTIONS = {
			"lower(universiteTanimlari.adi) like lower(concat(#{universiteTanimlariList.universite.adi},'%'))",
			 };

	private UniversiteTanimlari universite = new UniversiteTanimlari();

	public void universiteListesiOlustur(){
		universiteList=new ArrayList<UniversiteTanimlari>();
	 	universiteList=entityManager.createNamedQuery("universiteTumKayitlar").getResultList();
		
	}

	
	public UniversiteTanimlariList() {
		setEjbql(EJBQL);
		setRestrictionExpressionStrings(Arrays.asList(RESTRICTIONS));
		setMaxResults(25);
	}


	public UniversiteTanimlari getUniversite() {
		return universite;
	}


	public void setUniversite(UniversiteTanimlari universite) {
		this.universite = universite;
	}


	public List<UniversiteTanimlari> getUniversiteList() {
		return universiteList;
	}


	public void setUniversiteList(List<UniversiteTanimlari> universiteList) {
		this.universiteList = universiteList;
	}
	
 
	 
	 
 
}
